package com.company.http;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public abstract class ACallback<T> {
    public Type mType;
    protected ACallback() {
        Type superClass = super.getClass().getGenericSuperclass();
        this.mType = ((ParameterizedType) superClass).getActualTypeArguments()[0];
    }
    public abstract void onSuccess(T data);
    public abstract void onFail(int errCode, String errMsg);
}
